package cn.tedu.carehome.foundation.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class VisitorAddNewDTO implements Serializable {
    /**
     * 访问人员姓名
     */
    @ApiModelProperty(value ="访问人员名字",required = true, example = "张三")
    @NotNull(message = "必须填写姓名")
    private String name;
    /**
     * 访问人员联系方式
     */
    @ApiModelProperty(value ="访问人员联系方式",required = true, example = "18772296103")
    @NotNull(message = "必须填写手机号码")
    @Pattern(regexp = "\\d{11}",message = "手机号码必须为数字，且满足11位的要求")
    private String phone;
    /**
     * 被拜访老人Id
     */
    @ApiModelProperty(value ="访问人员联系方式",required = true, example = "18772295147")
    @NotNull(message = "必须填写老人Id")
    private Long oldId;

    /**
     * 访问人员与被拜访老人的关系
     */
    @ApiModelProperty(value ="访问人员与被拜访老人关系",required = true, example = "儿子")
    @NotNull(message = "必须填写访问人员与被拜访老人关系")
    private String relation;

    /**
     * 访问人员拜访时间
     */
    @ApiModelProperty(value ="访问人员拜访时间",required = true, example = "2023-2-3")
    @NotNull(message = "必须填写访问人员拜访时间")
    private String visitTime;
}
